/*
 * Copyright (C) 2017-2021
 * All rights reserved, Designed By 深圳中科鑫智科技有限公司
 * Copyright authorization contact 18814114118
 */
package com.shop.cereshop.commons.domain.bsamecity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import java.time.LocalDateTime;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 同城寄件订单表
 * </p>
 *
 * @since 2025-08-11
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@TableName("cere_bsamecity_order")
@ApiModel(value = "BsamecityOrder", description = "同城寄件订单表")
@AllArgsConstructor
public class BsamecityOrder {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @ApiModelProperty(value = "主键ID")
    @NotNull(message = "主键ID不能为空")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;


    /**
     * 本地系统订单ID，用于关联本地业务数据
     */
    @ApiModelProperty(value = "本地系统订单ID，用于关联本地业务数据")
    @NotEmpty(message = "本地系统订单ID，用于关联本地业务数据不能为空")
    @TableField(value = "local_order_id", condition = LIKE)
    private String localOrderId;


    /**
     *
     */
    @ApiModelProperty(value = "三方下单后快递单号")
    @TableField(value = "kd_order_id", condition = LIKE)
    private String kdOrderId;


    /**
     * 订单阶段：0-预下单，1-正式下单
     */
    @ApiModelProperty(value = "订单阶段：0-预下单，1-正式下单")
    @NotNull(message = "订单阶段：0-预下单，1-正式下单不能为空")
    @TableField("order_stage")
    private Integer orderStage;


    /**
     * 快递公司编码(小写字母)
     */
    @ApiModelProperty(value = "快递公司编码(小写字母)")
    @Length(max = 20, message = "快递公司编码(小写字母)长度不能超过20")
    @TableField(value = "kuaidicom", condition = LIKE)
    private String kuaidicom;


    /**
     * 坐标类型：1-百度坐标，2-高德坐标
     */
    @ApiModelProperty(value = "坐标类型：1-百度坐标，2-高德坐标")
    @TableField("lbs_type")
    private Integer lbsType;


    /**
     * 收件人姓名(最长20字符)
     */
    @ApiModelProperty(value = "收件人姓名(最长20字符)")
    @Length(max = 20, message = "收件人姓名(最长20字符)长度不能超过20")
    @TableField(value = "rec_man_name", condition = LIKE)
    private String recManName;


    /**
     * 收件人手机号(支持手机和固话)
     */
    @ApiModelProperty(value = "收件人手机号(支持手机和固话)")
    @Length(max = 20, message = "收件人手机号(支持手机和固话)长度不能超过20")
    @TableField(value = "rec_man_mobile", condition = LIKE)
    private String recManMobile;


    /**
     * 收件人省份
     */
    @ApiModelProperty(value = "收件人省份")
    @Length(max = 20, message = "收件人省份长度不能超过20")
    @TableField(value = "rec_man_province", condition = LIKE)
    private String recManProvince;


    /**
     * 收件人城市
     */
    @ApiModelProperty(value = "收件人城市")
    @Length(max = 20, message = "收件人城市长度不能超过20")
    @TableField(value = "rec_man_city", condition = LIKE)
    private String recManCity;


    /**
     * 收件人区县
     */
    @ApiModelProperty(value = "收件人区县")
    @Length(max = 20, message = "收件人区县长度不能超过20")
    @TableField(value = "rec_man_district", condition = LIKE)
    private String recManDistrict;


    /**
     * 收件人详细地址
     */
    @ApiModelProperty(value = "收件人详细地址")
    @Length(max = 100, message = "收件人详细地址长度不能超过100")
    @TableField(value = "rec_man_addr", condition = LIKE)
    private String recManAddr;


    /**
     * 收件人地址纬度
     */
    @ApiModelProperty(value = "收件人地址纬度")
    @Length(max = 10, message = "收件人地址纬度长度不能超过10")
    @TableField(value = "rec_man_lat", condition = LIKE)
    private String recManLat;


    /**
     * 收件人地址经度
     */
    @ApiModelProperty(value = "收件人地址经度")
    @Length(max = 10, message = "收件人地址经度长度不能超过10")
    @TableField(value = "rec_man_lng", condition = LIKE)
    private String recManLng;


    /**
     * 寄件人姓名
     */
    @ApiModelProperty(value = "寄件人姓名")
    @Length(max = 20, message = "寄件人姓名长度不能超过20")
    @TableField(value = "send_man_name", condition = LIKE)
    private String sendManName;


    /**
     * 寄件人手机号
     */
    @ApiModelProperty(value = "寄件人手机号")
    @Length(max = 20, message = "寄件人手机号长度不能超过20")
    @TableField(value = "send_man_mobile", condition = LIKE)
    private String sendManMobile;


    /**
     * 寄件人省份
     */
    @ApiModelProperty(value = "寄件人省份")
    @Length(max = 20, message = "寄件人省份长度不能超过20")
    @TableField(value = "send_man_province", condition = LIKE)
    private String sendManProvince;


    /**
     * 寄件人城市
     */
    @ApiModelProperty(value = "寄件人城市")
    @Length(max = 20, message = "寄件人城市长度不能超过20")
    @TableField(value = "send_man_city", condition = LIKE)
    private String sendManCity;


    /**
     * 寄件人区县
     */
    @ApiModelProperty(value = "寄件人区县")
    @Length(max = 20, message = "寄件人区县长度不能超过20")
    @TableField(value = "send_man_district", condition = LIKE)
    private String sendManDistrict;


    /**
     * 寄件人详细地址
     */
    @ApiModelProperty(value = "寄件人详细地址")
    @Length(max = 100, message = "寄件人详细地址长度不能超过100")
    @TableField(value = "send_man_addr", condition = LIKE)
    private String sendManAddr;


    /**
     * 寄件人地址纬度
     */
    @ApiModelProperty(value = "寄件人地址纬度")
    @Length(max = 10, message = "寄件人地址纬度长度不能超过10")
    @TableField(value = "send_man_lat", condition = LIKE)
    private String sendManLat;


    /**
     * 寄件人地址经度
     */
    @ApiModelProperty(value = "寄件人地址经度")
    @Length(max = 10, message = "寄件人地址经度长度不能超过10")
    @TableField(value = "send_man_lng", condition = LIKE)
    private String sendManLng;


    /**
     * 物品总重量(KG)
     */
    @ApiModelProperty(value = "物品总重量(KG)")
    @TableField("weight")
    private BigDecimal weight;


    /**
     * 备注信息
     */
    @ApiModelProperty(value = "备注信息")
    @Length(max = 255, message = "备注信息长度不能超过255")
    @TableField(value = "remark", condition = LIKE)
    private String remark;


    /**
     * 物品体积(cm³)
     */
    @ApiModelProperty(value = "物品体积(cm³)")
    @Length(max = 20, message = "物品体积(cm³)长度不能超过20")
    @TableField(value = "volume", condition = LIKE)
    private String volume;


    /**
     * 订单类型：0-无需预约，1-预约送达，2-预约上门
     */
    @ApiModelProperty(value = "订单类型：0-无需预约，1-预约送达，2-预约上门")
    @TableField("order_type")
    private Integer orderType;


    /**
     * 期望取货时间(orderType=2时必填)
     */
    @ApiModelProperty(value = "期望取货时间(orderType=2时必填)")
    @TableField("expect_pickup_time")
    private LocalDateTime expectPickupTime;


    /**
     * 期望送达时间(orderType=1时必填)
     */
    @ApiModelProperty(value = "期望送达时间(orderType=1时必填)")
    @TableField("expect_finish_time")
    private LocalDateTime expectFinishTime;


    /**
     * 保价金额
     */
    @ApiModelProperty(value = "保价金额")
    @TableField("insurance")
    private BigDecimal insurance;


    /**
     * 物品总金额
     */
    @ApiModelProperty(value = "物品总金额")
    @TableField("price")
    private BigDecimal price;


    /**
     * 是否专人直送：0-否，1-是
     */
    @ApiModelProperty(value = "是否专人直送：0-否，1-是")
    @TableField("direct_delivery")
    private Integer directDelivery;


    /**
     * 商品详情(JSON格式存储)
     */
    @ApiModelProperty(value = "商品详情(JSON格式存储)")
    @Length(max = 65535, message = "商品详情(JSON格式存储)长度不能超过65535")
    @TableField("goods_json")
    private String goodsJson;


    /**
     * 回调地址
     */
    @ApiModelProperty(value = "回调地址")
    @Length(max = 255, message = "回调地址长度不能超过255")
    @TableField(value = "callback_url", condition = LIKE)
    private String callbackUrl;


    /**
     * 签名用随机字符串
     */
    @ApiModelProperty(value = "签名用随机字符串")
    @Length(max = 20, message = "签名用随机字符串长度不能超过20")
    @TableField(value = "salt", condition = LIKE)
    private String salt;


    /**
     * 快递100任务ID(下单返回的taskId)
     */
    @ApiModelProperty(value = "快递100任务ID(下单返回的taskId)")
    @Length(max = 64, message = "快递100任务ID(下单返回的taskId)长度不能超过64")
    @TableField(value = "task_id", condition = LIKE)
    private String taskId;


    /**
     * 取消原因类型
     */
    @ApiModelProperty(value = "取消原因类型")
    @TableField("cancel_msg_type")
    private Integer cancelMsgType;


    /**
     * 取消原因描述
     */
    @ApiModelProperty(value = "取消原因描述")
    @Length(max = 255, message = "取消原因描述长度不能超过255")
    @TableField(value = "cancel_msg", condition = LIKE)
    private String cancelMsg;


    /**
     * 订单状态：1-已创建，2-已接单，3-配送中，4-已完成，5-已取消
     */
    @ApiModelProperty(value = "订单状态：1-已创建，2-已接单，3-配送中，4-已完成，5-已取消")
    @TableField("order_status")
    private Integer orderStatus;


    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;


    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * `delivery_distance` varchar(50) DEFAULT NULL COMMENT '配送距离	单位：米',
     * `discount_fee` varchar(50) DEFAULT NULL COMMENT '配送费 单位：元',
     * `estimate_delivery_time` varchar(100) DEFAULT NULL COMMENT '预计配送时间	单位：秒',
     */

    @ApiModelProperty(value = "配送距离	单位：米")
    private String deliveryDistance;
    @ApiModelProperty(value = "配送费 单位：元")
    private String discountFee;
    @ApiModelProperty(value = "预计配送时间	单位：秒")
    private String estimateDeliveryTime;


}
